import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/login/Login'
import Home from "../views/home/Home";
import FoodList from "../views/home/foodList";
import AddFood from "../views/home/addFood";
import OrderFood from "../views/home/orderFood";
import OrderInfo from "../views/home/orderInfo";
import UserList from "../views/home/userList";
import AddNotice from "../views/home/addNotice";
import NoticeList from "../views/home/noticeList";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children:[
        {
          path: '/foodList',
          name: 'foodList',
          component: FoodList
        },
        {
          path: '/addFood',
          name: 'addFood',
          component: AddFood
        },
        {
          path: '/orderFood',
          name: 'orderFood',
          component: OrderFood
        },
        {
          path: '/orderInfo',
          name: 'orderInfo',
          component: OrderInfo
        },
        {
          path: '/userList',
          name: 'userList',
          component: UserList
        },
        {
          path: '/noticeList',
          name: 'noticeList',
          component: NoticeList
        },
        {
          path: '/addNotice',
          name: 'addNotice',
          component: AddNotice
        },
      ]
    }
  ]
})
